<template>
	<view class="announcement">
		<view class="" style="height: 160rpx;">
			<view class="mail_List" style="position: fixed;">
				<view class="mail gradient" style="font-weight: 700;">
					<view class="order">社区活动</view>
				</view>
			</view>
			<view class="icon" style="position: fixed;">
				<u-icon name="arrow-left" color="#fefefe" size="40" @click="navigateBack"></u-icon>
			</view>
		</view>
		<view class="plus_circle">
			<u-icon name="plus-circle" size="120" @click="newNotice"></u-icon>
		</view>
		<view>
			<uni-card class="second_card" style="margin: 0;">
				<u-cell-group :border="false" v-for="(item,index) in application" :key=index>
					<u-cell-item :title="item.noticeTitle" arrow-direction="right" :label="item.createTime" @click="noticeDetails(item.noticeId)">
					</u-cell-item>
				</u-cell-group>
			</uni-card>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				// 所有展示数据
				application:'',
				// 搜索内容
				deviceName: '',
				// 搜索展示数据
				searchOwners: '',
			}
		},
		onShow() {
			// 展示全部数据
			this.getRecords()
		},
		methods: {
			// 展示全部数据
			getRecords() {
				this.$http.get('informationInquiry/selectNoticeAll',{}).then(res => {
					console.log(res, '课程分类')
					this.application = res.data
				})
			},
			noticeDetails(noticeId) {
				this.openUrl(`/pagesA/application/announcement/noticeDetails/noticeDetails?noticeId=${noticeId}`)
			},
			// noticeDetails() {
			// 	this.openUrl('/pagesA/application/announcement/noticeDetails/noticeDetails')
			// },
			newNotice() {
				console.log(11)
				this.openUrl('/pagesA/application/announcement/newNotice/newNotice')
			}
		}
	}
</script>

<style lang="scss" scoped>
	.announcement {
		.mail_List {
			overflow: hidden;
			width: 100%;
			background-color: #f2f2f2;
		
			.mail {
				height: 160rpx;
				line-height: 230rpx;
				color: #fff;
				font-size: 40rpx;
				background-color: #2a4f65;
			}
		
			.order {
				text-align: center;
			}
		}
		
		.icon {
			position: absolute;
			top: 96rpx;
			left: 20rpx;
		}
		
		.icon_one {
			position: absolute;
			top: 1000rpx;
			right: 10rpx;
			z-index: 999;
		}
		
		/deep/.second_card {
		
			.uni-card {
				z-index: unset;
				margin: 24rpx 0;
			}
		
			/deep/.u-cell__value {
				margin-right: -18rpx;
			}
			
			u-cell-group {
				u-cell-item {
					.u-cell {
						// padding: 14rpx 24rpx!important;
						.u-cell_title {
							width: 446rpx !important;
							overflow: hidden !important;
							text-overflow: ellipsis !important;
							white-space: nowrap !important;
						}
					}
			
				}
			
			}
		
			.u-cell {
				padding: 14rpx 24rpx;
			}
		
			.uni-card__content {
				padding: 0 10rpx !important;
			}
		}
		
	}
</style>
